home *** CD-ROM | disk | FTP | other *** search
- #!/bin/csh -f
-
- # This file computes the differences between the original version of the
- # GNU Smalltalk source files and the current version of the same. It's
- # end result is the file mst.diffs that contains those differences in a format
- # that can be applied to patch to upgrade some other person's version of
- # GNU Smalltalk to your current version.
-
- # The entire process is driven off the file "mstfiles". This file contains the
- # names of all of the files that make up the GNU Smalltalk distribution. If
- # you add any files, you should be sure to add them to this file.
- #
- # Usage:
- # mk_mst_diffs [ origDir ]
- #
- # origDir is a version of the Smalltalk directory hierarchy to compare
- # against; it is the baseline, and defaults to "./orig"
-
-
- set origDir = ./orig
- if ($#argv > 0) then
- set origDir = $1
- endif
-
- set path=($cwd $path) # make sure that any cd's don't lose us
-
- print_file_names `cat mstfiles` | sort > mstfiles.srt
-
- print_file_names -d ${origDir} `cat ${origDir}/mstfiles` | sort > mstfiles.osrt
-
- comm -23 mstfiles.srt mstfiles.osrt > mstfiles.dif
-
- foreach file (`cat mstfiles.dif`)
- if ( -d $file ) then
- echo "You created new directory '$file'"
- mkdir ${origDir}/$file
- else
- echo "You created new file '$file'"
- touch ${origDir}/$file
- endif
- end
- rm -rf mstfiles.osrt mstfiles.dif mst.diffs
-
- foreach file (`cat mstfiles.srt`)
- if (-f ${file} ) then
- diff -c ${origDir}/${file} ./${file} > a.diff
- if (${status} == 1) then
- cat a.diff >> mst.diffs
- endif
- endif
- end
-
- rm -rf mstfiles.srt a.diff
-
- exit 0
-